package com.zzzyh.forumsystemclient.services.impl;

import com.zzzyh.forumsystemclient.services.ITokenBlacklistService;
import org.springframework.stereotype.Service;

import java.util.HashSet;
import java.util.Set;


@Service
public class TokenBlacklistServiceImpl implements ITokenBlacklistService {
    private Set<String> blacklist = new HashSet<>();

    public void addToBlacklist(String token) {
        blacklist.add(token);
    }

    public boolean isTokenBlacklisted(String token) {
        return blacklist.contains(token);
    }
}
